import request from '@/utils/request'

// 查询产品树列表
export function listTree(query) {
  return request({
    url: '/Sproduct/tree/list',
    method: 'get',
    params: query
  })
}

// 查询产品树详细
export function getTree(sdeptId) {
  return request({
    url: '/Sproduct/tree/' + sdeptId,
    method: 'get'
  })
}

// 新增产品树
export function addTree(data) {
  return request({
    url: '/Sproduct/tree',
    method: 'post',
    data: data
  })
}

// 修改产品树
export function updateTree(data) {
  return request({
    url: '/Sproduct/tree',
    method: 'put',
    data: data
  })
}

// 删除产品树
export function delTree(sdeptId) {
  return request({
    url: '/Sproduct/tree/' + sdeptId,
    method: 'delete'
  })
}
